﻿@{
    ViewBag.Title = "ListAll";
    Layout = "~/Views/Shared/_Page.cshtml";

    int currentIndex = 0;
    if (ViewBag.CurrentIndex != null)
    {
        currentIndex = ViewBag.CurrentIndex;
    }
}

<script src="/JS/Jq_Lib/jq_mask.js?201210081026" type="text/javascript"></script>
<script type="text/javascript">
    var empIndex = @currentIndex;

    function showAllEmployees() {
        jQuery.ajaxSetup({ cache: false });

        var url = "/Employee/ShowPageAjax?pageIndex=1&pageSize=10" ;

        $('#empInfo').mask('Please Wait');
        
        $.post(url, function (data) {
            $("#empInfo").html(data);
            $('#empInfo').unmask();   
        });
    }

    $(function(){	
        showAllEmployees();
    });
</script>

<h2>All Employees</h2>
<p>
	<a href="/Employee/Create">Add New Employee</a>
</p>

<br />

<div id="empInfo" style="width:650px;height:250px;">
</div>




